package com.cjj.navtong.adapter;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.TextView;

import com.cjj.navtong.R;
import com.cjj.navtong.db.Child;
import com.cjj.navtong.utils.LocalUtils;

public class TaskListAdapter extends ArrayAdapter<Child>{

	public TaskListAdapter(Context context) {
		super(context, 0);
	}
	
	@Override
	public View getView(int position, View convertView, ViewGroup parent) {
		convertView = LayoutInflater.from(getContext()).inflate(R.layout.task_list_item, null);
		TextView time = (TextView) convertView.findViewById(R.id.time);
		TextView content = (TextView) convertView.findViewById(R.id.content);
		time.setText(LocalUtils.timeFormat(Long.parseLong(getItem(position).time)));
		content.setText(getItem(position).responsion);
		return convertView;
	}
	

}
